﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sylvain.Model;

namespace Sylvain.Manager
{
  public class SylvainManager:ISylvainManager
    {
      //Instance of SylvainModel Class
       ISylvainModel objModel = new SylvainModel();

      /// <summary>
      /// Insert Page Content
      /// </summary>
      /// <param name="PageId">Page Id</param>
      /// <param name="PageContent">Page Content</param>
      /// <param name="UpdatedBy">Updated By</param>
       public void InsertPageContent(int PageId, string PageContent, string UpdatedBy)
       {
           objModel.InsertPageContent(PageId, PageContent, UpdatedBy);
       }
      /// <summary>
      /// Get Page Content
      /// </summary>
      /// <param name="PageId">Page Id</param>
      /// <returns>Page Content</returns>
       public string GetPageContent(int PageId)
       {
           return objModel.GetPageContent(PageId);
       }
      /// <summary>
      /// Get Page Id.
      /// </summary>
      /// <param name="PageHandler">Page Handler</param>
      /// <returns>Page Id</returns>
        public int GetPageId(string PageHandler)
        {
           return objModel.GetPageId(PageHandler);
        }
      
       #region Contract

      /// <summary>
      /// Add Contract
      /// </summary>
      /// <param name="objContract">Object of Contract</param>
       public void AddContract(Contract objContract)
       {
           objModel.AddContract(objContract);
       }
      /// <summary>
      /// Delete Contract
      /// </summary>
      /// <param name="ContractId">Contract Id</param>
       public Contract DeleteContract(int ContractId)
       {
           return objModel.DeleteContract(ContractId);
       }
      /// <summary>
      /// Edit Contract
      /// </summary>
      /// <param name="objContract">Object of Contract</param>
       public void EditContract(Contract objContract)
       {
           objModel.EditContract(objContract);
       }
      /// <summary>
      /// Get List of all Contracts
      /// </summary>
      /// <returns>List of Contracts</returns>
       public List<Contract> GetAllContracts()
       {
           return objModel.GetAllContracts();
       }
      /// <summary>
      /// Get Contract Description
      /// </summary>
      /// <param name="id">Contract Id</param>
      /// <returns>Contract Description</returns>
       public Contract GetContractDescription(int id)
       {
           return objModel.GetContractDescription(id);
       }

       #endregion

       #region News Section
      /// <summary>
      /// Display List of all News in Gridview 
      /// </summary>
      /// <returns>List of News Section</returns>
       public List<NewsSection> GetAllNews()
       {
           return objModel.GetAllNews();
       }
      /// <summary>
      /// Add News Section 
      /// </summary>
      /// <param name="objNewsSection">Object of NewsSection</param>
       public void AddNewsSection(NewsSection objNewsSection)
       {
           objModel.AddNewsSection(objNewsSection);
       }
      /// <summary>
      /// Delete News Section
      /// </summary>
      /// <param name="Id">News Id</param>
       public void DeleteNewsSection(int Id)
       {
           objModel.DeleteNewsSection(Id);
       }
      /// <summary>
      /// Edit News Section
      /// </summary>
      /// <param name="objNewsSection">Object of NewsSection</param>
       public void EditNewsSection(NewsSection objNewsSection)
       {
           objModel.EditNewsSection(objNewsSection);
       }
      /// <summary>
      /// Get Latest Quote
      /// </summary>
      /// <param name="tagid">Tag Id</param>
      /// <returns>Latest Quote</returns>
       public NewsSection GetLatestQuote(int tagid)
       {
           return objModel.GetLatestQuote(tagid);
       }
      /// <summary>
      /// Get Latest Press Release
      /// </summary>
      /// <param name="tagid">Tag Id</param>
      /// <returns>Latest Press Release</returns>
       public NewsSection GetLatestPressRelease(int tagid)
       {
           return objModel.GetLatestPressRelease(tagid);
       }
      /// <summary>
      /// Get Latest News
      /// </summary>
      /// <param name="tagid">Tag Id</param>
      /// <returns>Latest News</returns>
       public NewsSection GetLatestNews(int tagid)
       {
           return objModel.GetLatestNews(tagid);
       }
      /// <summary>
      /// Description for Search Keyword
      /// </summary>
      /// <param name="strSearch">Search Keyword</param>
      /// <returns>List of Description for Keyword</returns>
       public List<NewsSection> GetSearchDetails(string strSearch)
       {
           return objModel.GetSearchDetails(strSearch);
       }
       #endregion


       #region Employees Section
       /// <summary>
       /// Display List of all News in Gridview 
       /// </summary>
       /// <returns>List of News Section</returns>
       public List<EmployeesSection> GetAllEmployeesSection()
       {
           return objModel.GetAllEmployeesSection();
       }
       /// <summary>
       /// Add News Section 
       /// </summary>
       /// <param name="objNewsSection">Object of NewsSection</param>
       public void AddEmployeesSection(EmployeesSection objEmployeesSection)
       {
           objModel.AddEmployeesSection(objEmployeesSection);
       }
       /// <summary>
       /// Delete News Section
       /// </summary>
       /// <param name="Id">News Id</param>
       public void DeleteEmployeesSection(int Id)
       {
           objModel.DeleteEmployeesSection(Id);
       }
       /// <summary>
       /// Edit News Section
       /// </summary>
       /// <param name="objNewsSection">Object of NewsSection</param>
       public void EditEmployeesSection(EmployeesSection objEmployeesSection)
       {
           objModel.EditEmployeesSection(objEmployeesSection);
       }
       /// <summary>
       /// Get Latest Quote
       /// </summary>
       /// <param name="tagid">Tag Id</param>
       /// <returns>Latest Quote</returns>
       public EmployeesSection GetLatestCEOCorner(int tagid)
       {
           return objModel.GetLatestCEOCorner(tagid);
       }
       /// <summary>
       /// Get Latest Press Release
       /// </summary>
       /// <param name="tagid">Tag Id</param>
       /// <returns>Latest Press Release</returns>
       public EmployeesSection GetLatestWhatNew(int tagid)
       {
           return objModel.GetLatestWhatNew(tagid);
       }
      
       /// <summary>
       /// Description for Search Keyword
       /// </summary>
       /// <param name="strSearch">Search Keyword</param>
       /// <returns>List of Description for Keyword</returns>
       public List<EmployeesSection> GetEmployeesSearchDetails(string strSearch)
       {
           return objModel.GetEmployeesSearchDetails(strSearch);
       }


       public List<Employee> GetAllEmployees()
       {
           return objModel.GetAllEmployees();
       }
       public void AddEmployee(Employee objEmployee, string net_username, string net_password, string host)
       {
           objModel.AddEmployee(objEmployee, net_username, net_password, host);
       }
       public void EditEmployee(Employee objEmployee, string net_username, string net_password, string host)
       {
           objModel.EditEmployee(objEmployee, net_username, net_password, host);
       }
       public void DeleteEmployee(int Id)
       {
           objModel.DeleteEmployee(Id);
       }


       public void ForgotPassword(string email, string username, string net_username, string net_password, string host)
       {
           objModel.ForgotPassword(email,username,net_username, net_password, host);
       }

       public Employee GetLogin(string usename, string password)
       {
           return objModel.GetLogin(usename, password);
       }
       #endregion



       #region Publications

       /// <summary>
       /// Display all Records for Publication in Gridview
       /// </summary>
       /// <returns>List of Publications</returns>
       public List<Publication> GetAllPublications()
       {
           return objModel.GetAllPublications();
       }

       /// <summary>
       /// Add Record in Publication
       /// </summary>
       /// <param name="objPublication">Object of Publication</param>
       public void AddPublication(Publication objPublication)
       {
           objModel.AddPublication(objPublication);
       }

       /// <summary>
       /// Delete Record in Publication
       /// </summary>
       /// <param name="Id">Publication Id</param>
       public void DeletePublication(int Id)
       {
           objModel.DeletePublication(Id);
       }

       /// <summary>
       /// Edit Record in Publication
       /// </summary>
       /// <param name="objPublication">Object of Publication</param>
       public void EditPublication(Publication objPublication)
       {
           objModel.EditPublication(objPublication);
       }

       /// <summary>
       /// Get Current Publication
       /// </summary>
       /// <returns>Latest Publication</returns>
       public Publication GetCurrentPublication()
       {
           return objModel.GetCurrentPublication();
       }

       /// <summary>
       /// Get Publication
       /// </summary>
       /// <returns>Publication</returns>
       public Publication GetPublication(int Id)
       {
           return objModel.GetPublication(Id);
       }
       #endregion
    }
}
